package com.eupmt.lab3.domain;

import com.eupmt.lab3.domain.ibator.IbatorClient;
import static com.eupmt.lab3.utils.Constants.*;

public class Client extends IbatorClient {

    public Client() {
        super();
        setIdclient(UNDEFINED);
    }

    //Overrides
    @Override
    public boolean equals(Object o) {
        return (o != null) && (o instanceof Client) &&
                (getNif().equals(((Client) o).getNif()));
    }

    @Override
    public int hashCode() {
        int hash = 5;
        return hash;
    }

    @Override
    public String toString() {
        String str = "\n Client.\n";
        str += "nif: " + getNif() + "\n";
        str += "idclient: " + getIdclient() + "\n";
        str += "nom: " + getNom() + "\n";
        str += "grauAcces: " + getCognom() + "\n";
        str += "adreca: " + getAdreca() + "\n";
        str += "telefon: " + getTelefon() + "\n";
        str += "email: " + getEmail() + "\n";
        return str;
    }
}
